= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 A u t h o r :   Y o u n g w o o k   K i m   ( K o r e a n ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 C o n t a c t :   r u m i a 0 6 0 1 @ g m a i l . c o m 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 0  ̬
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 - Ttt  t0  \  pt
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 t  \ȸҔ  t  DȲ|  t  \    D  x.   %D    %tǘ  ̬   0  L8t.   <`,   ĳX  ̸  D  t  @  $  JŔ  ( \D  ̸XՔ    X\) .    ,   Ƭ   H e l l o   W o r l d !     ٳ<\  tǌ  `  t.   t  t  \ȸҔ  t  \  t  D̲  `ȲTtX  D  |  t.   Ż  MѤ¸|  |L?   Ƭ  MѤ¸X  X   I n i t i a l   s t a t e m e n t   0T(D  L  .   t,   t  X   A l w a y s   s t a t e m e n t   ptǸ  Xt  .   <`,    x     DՔ`  t. 
 
 
 
 
 
 . .   i m a g e : :   B a g i c - P R O C E S S - s o u r c e c o d e . p n g 
 
       : c l a s s :   i n l i n e d - r i g h t 
 
 
 
 . .   c o d e - b l o c k : :   p y t h o n 
 
       : l i n e n o s : 
 
 
 
       i m p o r t   s y s ,   p y g a m e 
 
       p y g a m e . i n i t ( ) 
 
 
 
       s i z e   =   w i d t h ,   h e i g h t   =   2 2 0 ,   1 4 0 
 
       s p e e d   =   [ 2 ,   2 ] 
 
       b l a c k   =   0 ,   0 ,   0 
 
 
 
       s c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( s i z e ) 
 
 
 
       b a l l   =   p y g a m e . i m a g e . l o a d ( " B a g i c - P R O C E S S - s o u r c e c o d e . p n g " ) 
 
       b a l l r e c t   =   b a l l . g e t _ r e c t ( ) 
 
 
 
       w h i l e   1 : 
 
               f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) : 
 
                       i f   e v e n t . t y p e   = =   p y g a m e . Q U I T :   s y s . e x i t ( ) 
 
 
 
               b a l l r e c t   =   b a l l r e c t . m o v e ( s p e e d ) 
 
               i f   b a l l r e c t . l e f t   <   0   o r   b a l l r e c t . r i g h t   >   w i d t h : 
 
                       s p e e d [ 0 ]   =   - s p e e d [ 0 ] 
 
               i f   b a l l r e c t . t o p   <   0   o r   b a l l r e c t . b o t t o m   >   h e i g h t : 
 
                       s p e e d [ 1 ]   =   - s p e e d [ 1 ] 
 
 
 
               s c r e e n . f i l l ( b l a c k ) 
 
               s c r e e n . b l i t ( b a l l ,   b a l l r e c t ) 
 
               p y g a m e . d i s p l a y . f l i p ( ) 
 
 
 
 
 
 . .   i m a g e : :   B a g i c - P R O C E S S - r e s u l t s c r e e n . p n g 
 
       : c l a s s :   i n l i n e d - r i g h t 
 
 
 
 . .   c o d e - b l o c k : :   p y t h o n 
 
       : l i n e n o s : 
 
 
 
       i m p o r t   s y s ,   p y g a m e 
 
       p y g a m e . i n i t ( ) 
 
 
 
       s i z e   =   w i d t h ,   h e i g h t   =   2 2 0 ,   1 4 0 
 
       s p e e d   =   [ 2 ,   2 ] 
 
       b l a c k   =   0 ,   0 ,   0 
 
 
 
       s c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( s i z e ) 
 
 
 
       b a l l   =   p y g a m e . i m a g e . l o a d ( " B a g i c - P R O C E S S - r e s u l t s c r e e n . p n g " ) 
 
       b a l l r e c t   =   b a l l . g e t _ r e c t ( ) 
 
 
 
       w h i l e   1 : 
 
               f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) : 
 
                       i f   e v e n t . t y p e   = =   p y g a m e . Q U I T :   s y s . e x i t ( ) 
 
 
 
               b a l l r e c t   =   b a l l r e c t . m o v e ( s p e e d ) 
 
               i f   b a l l r e c t . l e f t   <   0   o r   b a l l r e c t . r i g h t   >   w i d t h : 
 
                       s p e e d [ 0 ]   =   - s p e e d [ 0 ] 
 
               i f   b a l l r e c t . t o p   <   0   o r   b a l l r e c t . b o t t o m   >   h e i g h t : 
 
                       s p e e d [ 1 ]   =   - s p e e d [ 1 ] 
 
 
 
               s c r e e n . f i l l ( b l a c k ) 
 
               s c r e e n . b l i t ( b a l l ,   b a l l r e c t ) 
 
               p y g a m e . d i s p l a y . f l i p ( ) 
 
 
 
 
 
 ( M o v i n g   W o r l d   \ȸX    Tܴ  |ǀ  @    ) 
 
 
 
 ( M o v i n g   W o r l d    LtxtܴX  tǘ  D V D   Tt80  x. ) 
 
 
 
 
 
 
 
 # 1   -   # 5    I n i t i a l 8X     .   \,     i f - e l s e 8@  A l w a y s 8X  ^ŀ   ,   # 1 1 t  A l w a y s 8X     .   # 2   -   # 1 0 t  4D  ̬XՔɔ  }.   A l w a y s 8t     L  M o v i n g   W o r l d X  \  t  |    .   X̹  8   .   M o v i n g   W o r l d   ȹ  `|L?   M o v i n g   W o r l d X  ǔ  踸2   @  UX.   ( <|  Ȭ|  tǩXt)   X̹  ȹ    M o v i n g   W o r l d X      ?   tǃ@  A l w a y s 8X    ĳ|  X  JŔ  t  LDż    .   ( tǃ@  A l w a y s 8t  XՔ  Hĳ  0|  |\)       ĳ  0ȹ  t.     t  @       . 
 
 
 
 Ƭ  t  \ȸX    ĳt|  PD   t|  \.   Ż?   # 1   # 1 1 D  t,   I n i t i a l   s t a t e m e n t   p y g a m e . t i m e . C l o c k ( ) h ,   A l w a y s 8  t i c k ( 6 0 ) h   LD  Ux`    .   6 0 t|    0  F P S ( F r a m e   P e r   S e c o n d ) |  X\.   F P S    1   Ttt  ȹ    |  X\.   TtD  ( ptǸXՔ)   tǌX  h  4x ?   \  P y g a m e . d i s p l a y . u p d a t e ( )   ht.   \,   F P S   1   A l w a y s 8t    |  XXՌ  .   tǔ  A l w a y s 8  Ŕ    X՘X  P y g a m e . d i s p l a y . u p d a t e ( )   h   tȬX0  L8t.   F P S   |ǅX   x  t  h@  @  0( \  ̬  ĳ  0|) D  \,    x     h   DȲ\,   F P S t  4  lt  F P S  \  ٳX  JD    .   Ƭ   \ȸ    ( F P S ) D    Pt,       $ȸX  \  ̹  >DŴt    $ȸX  ĳ|  `    .   p y g a m e . t i m e . C l o c k ( ) @  t  0  t  ĳ|  ¤Д  0D  \.   t i c k h  P y g a m e . d i s p l a y . u p d a t e ( )     @|  \.   \аXt  t i c k h  Ttt      ptǸŔ|  ĬX0  L8t.   P y g a m e . d i s p l a y . u p d a t e ( )   h    |  XՔ    H  h    X՘t. 
 
 
 
 Ttt  ptǸ     L,   D  XՔ  )D  LX.     Tt䲔  t  tǔ  Ttt     ι<\,   t|  ܴ  L  Ǵ|  \.   췘,   t  \ȸҔ     4  }  !0  L8  t  D̲    x䲔  @  Dĳ  .   ( |    %t  <\)   t ,   %  \t     |̹  \. 
 
 
 
 
 
 < 8  Tܴ>   : : 
 
 
 
         i m p o r t   p y g a m e ,   s y s 
 
         f r o m   p y g a m e . l o c a l s   i m p o r t * 
 
 
 
         w h i t e   =   ( 2 5 5 , 2 5 5 , 2 5 5 ) 
 
         r e d   =   ( 2 5 5 , 0 , 0 ) 
 
         g r e e n   =   ( 0 , 2 5 5 , 0 ) 
 
         p y g a m e . i n i t ( ) 
 
         p y g a m e . d i s p l a y . s e t _ c a p t i o n ( " M o v i n g   W o r l d   P r o j e c t " )   
 
         m y S c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( ( 6 4 0 ,   4 8 0 ) ) 
 
         m y T e x t F o n t   =   p y g a m e . f o n t . F o n t ( " H o o n W h i t e c a t R . t t f " ,   3 2 ) 
 
         m y T e x t   =   m y T e x t F o n t . r e n d e r ( " M o v i n g   W o r l d ! " ,   T r u e ,   r e d ,   g r e e n )   
 
         m y T e x t A r e a   =   m y T e x t . g e t _ r e c t ( ) 
 
         m y T e x t A r e a . c e n t e r   =   ( 3 2 0 ,   2 4 0 ) 
 
         f p s C l o c k   =   p y g a m e . t i m e . C l o c k ( )   # 1 
 
         x   =   0   # 2 
 
         y   =   0   # 3 
 
         m o v e R i g h t   =   1   # 4 
 
         m o v e U p =   1   # 5 
 
 
 
         w h i l e   T r u e : 
 
                 i f   ( m o v e R i g h t   = =   1 ) :   # 6 
 
                         x   =   x   +   1 
 
                         i f   ( x   > =   3 2 0   -   7 5 ) : 
 
                                 m o v e R i g h t   =   0 
 
                 e l i f   ( m o v e R i g h t   = =   0 ) :   # 7 
 
                         x   =   x   -   1 
 
                         i f   ( x   < =   - 3 2 0   +   7 5 ) : 
 
                                 m o v e R i g h t   =   1 
 
 
 
                 i f   ( m o v e U p   = =   1 ) :   # 8 
 
                         y   =   y   +   1 
 
                         i f   ( y   > =   2 4 0   -   1 5 ) : 
 
                                 m o v e U p   =   0 
 
                 e l i f   ( m o v e U p   = =   0 ) :   # 9 
 
                         y   =   y   -   1 
 
                         i f   ( y   < =   - 2 4 0   +   1 5 ) : 
 
                                 m o v e U p   =   1 
 
 
 
 
 
 
 
         m y T e x t A r e a . c e n t e r   =   ( 3 2 0   +   x ,   2 4 0   +   y )   # 1 0 
 
         
 
         m y S c r e e n . f i l l ( w h i t e ) 
 
         m y S c r e e n . b l i t ( m y T e x t ,   m y T e x t A r e a ) 
 
 
 
         f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) : 
 
                 i f   e v e n t . t y p e   = =   Q U I T : 
 
                         p y g a m e . q u i t ( ) 
 
                         s y s . e x i t ( ) 
 
 
 
         p y g a m e . d i s p l a y . u p d a t e ( ) 
 
         f p s C l o c k . t i c k ( 6 0 )   # 1 1 
 
 
 
 